package com.ning.ems.enums;

/**
 * @author Ning 242741154@qq.com
 * @date 2020/3/3 9:49
 */
@SuppressWarnings("unused")
public enum PackageState {
    SUBMITTED(1, "已提交"),
    COLLECTING(2, "正在揽收"),
    TRANSPORTING(3, "正在运输"),
    DISTRIBUTING(4, "正在派送"),
    SIGNED(5, "已签收");

    int id;
    String desc;

    PackageState(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static String descOf(int id) {
        for (PackageState value : values()) {
            if (value.id == id) {
                return value.desc;
            }
        }
        return "";
    }
}
